function openTextbookImg(id,pageName){
    $.post('/textbook/page/list/'+id,{}, function(data){
        let shtml="";
        let imgId=1;
        let listPage=data.pages;
        for(let i=0;i<listPage.length;i++){
            let name=listPage[i];
            shtml+='<img layer-src="//hkmaterials.etalk365.com/'+data.address+'/'+name+'.jpg" alt="'+name+'">';
            if (name===pageName){
                imgId=i+1;
            }
        }
        $("#layer-photos-demo").html(shtml);
        layer.photos({
            photos: "#layer-photos-demo", //格式见API文档手册页
            closeBtn: 1,
            shadeClose:false,
            //,anim: 5 //0-6的选择，指定弹出图片动画类型，默认随机
        });
        layer.prompt({
            formType: 0,
            value: imgId,
            title: '请输入查看页码'
        }, function(value, index, elem){
            //alert(value); //得到value
            let regPos = /^\d+$/; // 非负整数
            if(regPos.test(value) && value<=listPage.length){
                value=value==0?1:value;
                $("#layer-photos-demo").find("img").eq(value-1).click();
                layer.close(index);
            }else{
                layer.alert("请输入1-"+listPage.length+"整数");
            }

        });

    },"json");

}